package hr.ctg.domain.model;

// Generated 2008.07.22 20:47:39 by Hibernate Tools 3.2.2.GA

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.validator.NotNull;

/**
 * OsobinaTipObjekta generated by hbm2java
 */
@Entity
@Table(name = "osobina_tip_objekta")
public class OsobinaTipObjekta implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1662403871810476098L;
	private Integer idOto;
	private TipObjekta tipObjekta;
	private Osobina osobina;

	public OsobinaTipObjekta() {
	}

	public OsobinaTipObjekta(TipObjekta tipObjekta, Osobina osobina) {
		this.tipObjekta = tipObjekta;
		this.osobina = osobina;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_oto", unique = true, nullable = false)
	public Integer getIdOto() {
		return this.idOto;
	}

	public void setIdOto(Integer idOto) {
		this.idOto = idOto;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_tipa_objekta", nullable = false)
	@NotNull
	public TipObjekta getTipObjekta() {
		return this.tipObjekta;
	}

	public void setTipObjekta(TipObjekta tipObjekta) {
		this.tipObjekta = tipObjekta;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_osobine", nullable = false)
	@NotNull
	public Osobina getOsobina() {
		return this.osobina;
	}

	public void setOsobina(Osobina osobina) {
		this.osobina = osobina;
	}

}
